package service.Supper.impl;

import dao.Supper.SuperSmallDao;
import dao.Supper.impl.SuperSmallDaImpl;
import pojo.Smallclass;
import service.Supper.SuperSmallService;

import java.util.List;

public class SuperSmallServiceImpl implements SuperSmallService {
    private SuperSmallDao superSmallDao;
    public SuperSmallServiceImpl(){
        superSmallDao = new SuperSmallDaImpl();
    }
    //计算总行数
    public int getTotalCount(String smallName, Long smallBigId) {
        return superSmallDao.getTotalCount(smallName,smallBigId);
    }

    //分页显示数据
    public List<Smallclass> selSsmlr(int currentPage, int pageSize, String smallName, Long smallBigId) {
        return superSmallDao.selSsmlr(currentPage,pageSize,smallName,smallBigId);
    }

    //根据id进行查询
    public List<Smallclass> selSsmlById(Long id) {
        return superSmallDao.selSsmlById(id);
    }

    //更新
    public int updateSsml(Smallclass smallclass) {
        return superSmallDao.updateSsml(smallclass);
    }

    //删除
    public int delSsml(Long id) {
        return superSmallDao.delSsml(id);
    }

    //添加
    public int addSsml(Smallclass smallclass) {
        return superSmallDao.addSsml(smallclass);
    }

   //验证小分类昵称
    public int checkSmallName(String name) {
        return superSmallDao.checkSmallName(name);
    }
}
